package com.goldgov.code.utils;

public class PackageUtils {

	private PackageUtils() {}
	
	public static String joinPackageName(String... packageName) {
		if(packageName.length == 0) {
			return "";
		}
		StringBuilder strBuilder = new StringBuilder(packageName[0]);
		for (int i = 1; i < packageName.length; i++) {
			if(i+1 < packageName.length) {
				strBuilder.append("." + packageName[i].toLowerCase());
			}else {
				strBuilder.append("." + packageName[i]);
			}
		}
		return strBuilder.toString();
	}
	
	public static String convertPath(String packageName) {
		return packageName.replaceAll("[.]", "/");
	}
}
